package model;

/****************************************************************************
 * Class: Customer
 * @author jdsmith
 * created on 9/12/2012
 * 
 * description: Represents a customer who places orders. Customers are
 * identified by a customer id.
 */
import java.io.Serializable;

public class Customer implements Serializable, Comparable<Customer> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String custId; //unique identifier for customers (4 digits)
	private String name; 
	private String address;
	
	/**
	 * constructor
	 * @param customer id
	 * @param name
	 * @param address
	 */
	public Customer(String custId, String name, String address){
		//check length of custId
		this.custId = custId;
		this.name = name;
		this.address = address;
	}

	/**
	 * getters and setters
	 */
	public String getCustId() {
		return custId;
	}

	public void setCustId(String custId) {
		this.custId = custId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Override
	public int compareTo(Customer arg0) {
		return this.custId.compareTo(arg0.custId);
	}
	

}
